package changeEmployeeTransaction.changeAffiliationTransaction;

import database.PayrollDatabase;
import addEmployeeTransaction.Employee;
import affiliation.UnionAffiliation;

public class ChangeMemberTransaction extends ChangeAffiliationTransaction {
	private int memberId;
	private double dues;

	public ChangeMemberTransaction(int empId, int memberId, double dues,
			PayrollDatabase database) {
		super(empId, database);
		this.memberId = memberId;
		this.dues = dues;
	}

	protected void RecordMembership(Employee e) {
		database.addUnionMember(memberId, e);
	}

	@Override
	protected affiliation.Affiliation getAffiliation() {
		return new UnionAffiliation(memberId, dues);
	}
}
